**************************************************************
**RISK AND DEMAND FOR SOCIAL PROTECTION IN AN ERA OF POPULISM*
**CODE TO REPLICATE FIGURES AND TABLES IN APPENDIX************
**Last Edit: July 20, 2022, by KB*****************************
**************************************************************

log using "Covidrisk_appendix_replication.log", replace


global esttabformat b(%8.2f) se(%8.2f) obs r2(%8.2f) star(+ 0.10 * 0.05 ** 0.01)


************
*APPENDIX D*
************


use "data/Covidrisk_wave1.dta", replace

*statistics on overall attention rates referenced in text*
sum passedAttentionCheck1 passedAttentionCheck2 passedone passedboth

**********
*TABLE D1*
**********
*statistics on attention rates by subgroup included in Table D1*
sum passedAttentionCheck1 passedAttentionCheck2 passedone passedboth if Democrat==0 & Republican==0
sum passedAttentionCheck1 passedAttentionCheck2 passedone passedboth if Democrat==1
sum passedAttentionCheck1 passedAttentionCheck2 passedone passedboth if Republican==1


************
*APPENDIX E*
************

use "data/Covidrisk_wave2.dta", replace

*statistics on overall attention rates referenced in text*
sum passedattention1 passedattention2 passedone passedboth

**********
*TABLE E1*
**********
*statistics on attention rates by subgroup included in Table E1*
sum passedattention1 passedattention2 passedone passedboth if (independent=="1" | independent=="2")
sum passedattention1 passedattention2 passedone passedboth if (democrat=="1" | democrat=="2")
sum passedattention1 passedattention2 passedone passedboth if (republican=="1" |republican=="2")

***********
*FIGURE E1*
*SUBJECTIVE RISK BY TREATMENT*
******************************


set scheme plotplain


preserve

collapse (mean) meanrisk= risk (sd) sdrisk=risk (count) n=risk, by(treatment)

generate hirisk = meanrisk + invttail(n-1,0.025)*(sdrisk / sqrt(n))
generate lowrisk = meanrisk - invttail(n-1,0.025)*(sdrisk / sqrt(n))


graph twoway (bar meanrisk treatment if treatment==0) (bar meanrisk treatment if treatment==1) (bar meanrisk treatment if treatment==2) (bar meanrisk treatment if treatment==3) (rcap hirisk lowrisk treatment),  ytitle("Average Subjective Insecurity") xlabel(0 "Control" 1 "Tech" 2 "Anti-Foreign" 3 "Anti-Elite", noticks) xtitle("") title("Average Subjective Insecurity by Treatment") legend( order(1 "Control" 2 "Technocratic" 3 "Anti-Foreign" 4 "Anti-Elite") )
graph export "figures_tables/FigureE1.tif", replace
	   
restore

***********
*FIGURE E2*
*RESPONDENT ANTI-TRADE AND PRO-IMMIGRATION ATTITUDES BY TREATMENT*
*******************************************************************

preserve

collapse (mean) meanantifor= trade (sd) sdantifor=trade (count) n=trade, by(treatment)

generate hiantifor = meanantifor + invttail(n-1,0.025)*(sdantifor / sqrt(n))
generate lowantifor = meanantifor - invttail(n-1,0.025)*(sdantifor / sqrt(n))


graph twoway (bar meanantifor treatment if treatment==0) (bar meanantifor treatment if treatment==1) (bar meanantifor treatment if treatment==2) (bar meanantifor treatment if treatment==3) (rcap hiantifor lowantifor treatment),  ytitle("Average Anti-Trade Attitudes") xlabel(0 "Control" 1 "Tech" 2 "Anti-Foreign" 3 "Anti-Elite", noticks) xtitle("") title("Average Anti-Trade Attitudes by Treatment") legend( order(1 "Control" 2 "Technocratic" 3 "Anti-Foreign" 4 "Anti-Elite") )
graph export "figures_tables/FigureE2_left.tif", replace
	   
restore


preserve

collapse (mean) meanantifor= immigration (sd) sdantifor=immigration (count) n=immigration, by(treatment)

generate hiantifor = meanantifor + invttail(n-1,0.025)*(sdantifor / sqrt(n))
generate lowantifor = meanantifor - invttail(n-1,0.025)*(sdantifor / sqrt(n))


graph twoway (bar meanantifor treatment if treatment==0) (bar meanantifor treatment if treatment==1) (bar meanantifor treatment if treatment==2) (bar meanantifor treatment if treatment==3) (rcap hiantifor lowantifor treatment),  ytitle("Average Pro-Immigrant Attitudes") xlabel(0 "Control" 1 "Tech" 2 "Anti-Foreign" 3 "Anti-Elite", noticks) xtitle("") title("Average Pro-Immigrant Attitudes by Treatment") legend( order(1 "Control" 2 "Technocratic" 3 "Anti-Foreign" 4 "Anti-Elite") )
graph export "figures_tables/FigureE2_right.tif", replace

restore

**********
*TABLE E2*
*REPLICATION OF MAIN RESULTS (DEMOCRAT AND INDEPENDENT SAMPLE ONLY)*
********************************************************************

preserve

keep if (democrat=="1" | democrat=="2" | independent=="1" | independent=="2")

eststo m1a: reg pandemicsupport tech for elite knowCovid, robust
eststo m1b: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
eststo m1c: reg pandemicsupport tech for elite jobeffectCovid3, robust
eststo m1d: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)

esttab m1a m1b m1c m1d using "figures_tables/AppendixtableE2.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell
*Note: lincom estimates added manually to table*

set scheme tufte

reg pandemicsupport knowCovid for elite tech forXknow eliteXknow techXknow, robust

predictnl diff_1 = (_b[for] + _b[forXknow]*knowCovid) - (_b[elite] + _b[eliteXknow]*knowCovid), se(diff1_se)

gen upper1 = diff_1 + diff1_se*1.96
gen lower1 = diff_1 - diff1_se*1.96

twoway (line diff_1 upper1 lower1 knowCovid, sort lcolor(gs2) lpattern(solid dash dash)), yline(0, lcolor(gs2) lpattern(dot)) legend(position(5) ring(0)) xtitle("Exposure to Health Shock", color(gs2)) ///
       ytitle("Differential Effect of Anti-Foreign vs. Anti-Elite", color(gs2)) ylabel(-0.5 (0.5) 2,nogrid) yscale(range(-0.5 (0.5) 2)) ///
	   xlabel (0 (0.5) 1) graphregion(fcolor(white) ifcolor(white) color(white) lcolor(white) ilcolor(white)) ///
	   legend(order(1 "Effect" 2 "95 % CIs"))
graph export "figures_tables/FigureE3_left.tif", replace

reg pandemicsupport jobeffectCovid3 for elite tech forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3, robust

predictnl diff_2 =  (_b[for] +_b[forXjobeffectCovid3]*jobeffectCovid3) - (_b[elite]+ _b[eliteXjobeffectCovid3]*jobeffectCovid3), se(diff2_se)

gen upper2 = diff_2 + diff2_se*1.96
gen lower2 = diff_2 - diff2_se*1.96

twoway (line diff_2 upper2 lower2 jobeffectCovid3, sort lcolor(gs2) lpattern(solid dash dash)), yline(0, lcolor(gs2) lpattern(dot)) legend(position(5) ring(0)) xtitle("Exposure to Economic Shock", color(gs2)) ///
       ytitle("Differential Effect of Anti-Foreign vs. Anti-Elite", color(gs2)) ylabel(-0.5 (0.5) 2,nogrid) yscale(range(-0.5 (0.5) 2)) ///
	   graphregion(fcolor(white) ifcolor(white) color(white) lcolor(white) ilcolor(white)) ///
	   legend(order(1 "Effect" 2 "95 % CIs"))
graph export "figures_tables/FigureE3_right.tif", replace

restore


************
*APPENDIX F*
************

use "data/Covidrisk_wave1.dta", replace

*****************************************************
*TABLE F1: CORRELATES OF HEALTH AND EMPLOYMENT SHOCK*
*****************************************************

eststo m1a: reg knowCovid female age hispanic_di black hhi trumpsupporter HighSchoolorLess CollegeDegree GraduateDegree, robust
eststo m1b: reg jobeffectCovid3 female age hispanic_di black hhi trumpsupporter HighSchoolorLess CollegeDegree GraduateDegree, robust

esttab m1a m1b using "figures_tables/AppendixtableF1.rtf", $esttabformat replace label onecell


*******************
*TABLE F3: BALANCE*
*******************

global DESCVARS female age hispanic_di black hhi trumpsupporter HighSchoolorLess CollegeDegree GraduateDegree knowCovid jobeffectCovid3
mata: mata clear

* Differences: (2)-(1)/Technocratic-Control

local i = 1

foreach var in $DESCVARS {
    reg `var' tech if (tech==1 | control==1), robust	
    outreg, keep(tech)  rtitle("`: var label `var''") stats(b) ///
        noautosumm store(row`i')  starlevels(10 5 1) starloc(1)
    outreg, replay(diff) append(row`i') ctitles("",Difference ) ///
        store(diff) note("")
    local ++i
}

outreg using "figures_tables/F3_Diff_21.doc", replay(diff) replace


*Differences: (3)-(1)/Anti-elite-Control 

local i = 1

foreach var in $DESCVARS {
    reg `var' elite if (elite==1 | control==1), robust
    outreg, keep(elite)  rtitle("`: var label `var''") stats(b) ///
        noautosumm store(row`i')  starlevels(10 5 1) starloc(1)
    outreg, replay(diff2) append(row`i') ctitles("",Difference ) ///
        store(diff2) note("")
    local ++i
}
outreg using "figures_tables/F3_Diff_31.doc", replay(diff2) replace


* Differences: (4)-(1)/Anti-foreign-Control

local i = 1

foreach var in $DESCVARS {
    reg `var' for if (for==1 | control==1), robust
    outreg, keep(for)  rtitle("`: var label `var''") stats(b) ///
        noautosumm store(row`i')  starlevels(10 5 1) starloc(1) 
    outreg, replay(diff3) append(row`i') ctitles("",Difference ) ///
        store(diff3) note("")
    local ++i
}
outreg using "figures_tables/F3_Diff_41.doc", replay(diff3) replace

*Differences: (3)-(4)/Anti-elite-Anti-foreign

local i = 1

foreach var in $DESCVARS {
    reg `var' elite if (elite==1 | for==1), robust
    outreg, keep(elite)  rtitle("`: var label `var''") stats(b) ///
        noautosumm store(row`i')  starlevels(10 5 1) starloc(1) 
    outreg, replay(diff4) append(row`i') ctitles("",Difference ) ///
        store(diff4) note("")
    local ++i
}
outreg using "figures_tables/F3_Diff_34.doc", replay(diff4) replace


local count: word count $DESCVARS
mat sumstat = J(`count',8,.)

local i = 1
foreach var in $DESCVARS {
	quietly: summarize `var' if control==1
	mat sumstat[`i',1] = r(mean)
	mat sumstat[`i',2] = r(sd)
    quietly: summarize `var' if elite==0 & for==0 & control==0
    mat sumstat[`i',3] = r(mean)
    mat sumstat[`i',4] = r(sd)
    quietly: summarize `var' if elite==1  
    mat sumstat[`i',5] = r(mean)
    mat sumstat[`i',6] = r(sd)
    quietly: summarize `var' if for==1  
    mat sumstat[`i',7] = r(mean)
    mat sumstat[`i',8] = r(sd)
    local i = `i' + 1
}

frmttable, statmat(sumstat) store(sumstat) sfmt(f,f,f,f,f,f,f,f)


outreg using "figures_tables/F3balance.doc", ///
    replay(sumstat) nocenter note("") plain replace ///
    ctitles( "", "", "", "Technocratic", "", "Antielite", "", "Antiforeign", "" \ "", mean, sd,  mean, sd,  mean, sd, mean, sd, Diff) ///
	multicol(1,2,2;1,4,2; 1,6,2; 1,8,2) 


*************************************************      
*FIGURE F1: ALTERNATIVE ECONOMIC RISK CATEGORIES*
*************************************************

set scheme plotplain

preserve

collapse (mean) meansupport= pandemicsupport (sd) sdsupport=pandemicsupport (count) n=pandemicsupport, by(econshock2 treatment)

generate hisupport = meansupport + invttail(n-1,0.025)*(sdsupport / sqrt(n))
generate lowsupport = meansupport - invttail(n-1,0.025)*(sdsupport / sqrt(n))

gen econtreatment = treatment+1 if econshock2==0
replace econtreatment = treatment+6 if econshock2==1
replace econtreatment = treatment+11 if econshock2==2

twoway (bar meansupport econtreatment if treatment==0) ///
       (bar meansupport econtreatment if treatment==1) ///
       (bar meansupport econtreatment if treatment==2) ///
       (bar meansupport econtreatment if treatment==3) ///
       (rcap hisupport lowsupport econtreatment), ///
	   yscale(range(1 4)) ylabel(1 (1) 4) ///
	   xlabel( 2.5 "Low" 7.5 "Middle" 12.5 "High", noticks) ///
	   xtitle("Economic Risk") ytitle("Mean Support Redistribution") ///
       legend( order(1 "Control" 2 "Technocratic" 3 "Anti-Foreign" 4 "Anti-Elite") )
graph export "figures_tables/FigureF1.tif", replace
	   
restore


*********************************
*FIGURE F2: DISTRIBUTION OF RISK*
*********************************

graph box jobeffectCovid3, over(treatment) ytitle("Economic Risk")
graph export "figures_tables/FigureF2.tif", replace


*******************************
*TABLE F4: DICHOTIMOUS RESULTS*
*******************************

eststo m9Aa: reg pandemicsupport_di knowCovid tech for elite, robust
eststo m9Ab: reg pandemicsupport_di knowCovid tech for elite techXknow forXknow eliteXknow, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
eststo m9Ac: reg pandemicsupport_di jobeffectCovid3 tech for elite, robust
eststo m9Ad: reg pandemicsupport_di jobeffectCovid3 tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)

esttab m9Aa m9Ab m9Ac m9Ad using "figures_tables/AppendixtableF4A.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell


eststo m9Ba: reg pandemicsupport_di2 knowCovid tech for elite, robust
eststo m9Bb: reg pandemicsupport_di2 knowCovid tech for elite techXknow forXknow eliteXknow, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
eststo m9Bc: reg pandemicsupport_di2 jobeffectCovid3 tech for elite, robust
eststo m9Bd: reg pandemicsupport_di2 jobeffectCovid3 tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)

esttab m9Ba m9Bb m9Bc m9Bd using "figures_tables/AppendixtableF4B.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell

*note lincom estimates added manually*

**********************************************************
*FIGURE F3: BAR CHART: DICHOTOMOUS RESULTS BY HEALTH RISK*
**********************************************************

set scheme plotplain

preserve

collapse (mean) meansupport= pandemicsupport_di (sd) sdsupport=pandemicsupport_di (count) n=pandemicsupport_di, by(healthshock treatment)

generate hisupport = meansupport + invttail(n-1,0.025)*(sdsupport / sqrt(n))
generate lowsupport = meansupport - invttail(n-1,0.025)*(sdsupport / sqrt(n))

gen healthtreatment = treatment+1 if healthshock==0
replace healthtreatment = treatment+6 if healthshock==1
replace healthtreatment = treatment+11 if healthshock==2

twoway (bar meansupport healthtreatment if treatment==0) ///
       (bar meansupport healthtreatment if treatment==1) ///
       (bar meansupport healthtreatment if treatment==2) ///
       (bar meansupport healthtreatment if treatment==3) ///
       (rcap hisupport lowsupport healthtreatment), ///
	   yscale(range(0 1)) ylabel(0 (.2) 1) ///
	   xlabel( 2.5 "Low" 7.5 "Middle" 12.5 "High", noticks) ///
	   xtitle("Health Risk") ytitle("Prop. Support Redistribution") ///
       legend( order(1 "Control" 2 "Technocratic" 3 "Anti-Foreign" 4 "Anti-Elite") )
graph export "figures_tables/FigureF3.tif", replace

restore


********************************************************
*FIGURE F4: BAR CHART: DICHOTOMOUS RESULTS BY ECON RISK*
********************************************************

preserve

collapse (mean) meansupport= pandemicsupport_di (sd) sdsupport=pandemicsupport_di (count) n=pandemicsupport_di, by(econshock treatment)

generate hisupport = meansupport + invttail(n-1,0.025)*(sdsupport / sqrt(n))
generate lowsupport = meansupport - invttail(n-1,0.025)*(sdsupport / sqrt(n))

gen econtreatment = treatment+1 if econshock==0
replace econtreatment = treatment+6 if econshock==1
replace econtreatment = treatment+11 if econshock==2

twoway (bar meansupport econtreatment if treatment==0) ///
       (bar meansupport econtreatment if treatment==1) ///
       (bar meansupport econtreatment if treatment==2) ///
       (bar meansupport econtreatment if treatment==3) ///
       (rcap hisupport lowsupport econtreatment), ///
	   yscale(range(0 1)) ylabel(0 (.2) 1) ///
	   xlabel( 2.5 "Low" 7.5 "Middle" 12.5 "High", noticks) ///
	   xtitle("Economic Risk") ytitle("Prop. Support Redistribution") ///
       legend( order(1 "Control" 2 "Technocratic" 3 "Anti-Foreign" 4 "Anti-Elite") )
graph export "figures_tables/FigureF4.tif", replace
	   
restore


******************************************
*TABLE F5: COVID EXPOSURE WITHOUT FRIENDS*
******************************************

eststo mA6: reg pandemicsupport knowCovid_nofriends tech for elite techXknow_nofriends forXknow_nofriends eliteXknow_nofriends, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)

esttab mA6 using "figures_tables/AppendixtableF5.rtf", order(for elite tech knowCovid_nofriends forXknow_nofriends eliteXknow_nofriends techXknow_nofriends) $esttabformat replace label onecell
*note: lincom estimates added manually*


*****************************************
*TABLE F6A: EFFECTS FOR TRUMP SUPPORTERS*
*****************************************

eststo mA5Aa: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid if trumpsupporter==1, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
test for + forXknow=elite + eliteXknow
test for + forXknow = tech + techXknow
test elite + eliteXknow = tech + techXknow
eststo mA5Ab: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3 if trumpsupporter==1, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
test for + forXjobeffectCovid3=elite + eliteXjobeffectCovid3
test for + forXjobeffectCovid3 = tech + techXjobeffectCovid3
test elite + eliteXjobeffectCovid3 = tech + techXjobeffectCovid3
esttab mA5Aa mA5Ab using "figures_tables/AppendixtableF6A.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell
*lincom estimates added manually

*********************************************
*TABLE F6B: EFFECTS FOR NON-TRUMP SUPPORTERS*
*********************************************

eststo mA5Ba: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid if trumpsupporter==0, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
test for + forXknow=elite + eliteXknow
test for + forXknow = tech + techXknow
test elite + eliteXknow = tech + techXknow
eststo mA5Bb: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3 if trumpsupporter==0, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
test for + forXjobeffectCovid3=elite + eliteXjobeffectCovid3
test for + forXjobeffectCovid3 = tech + techXjobeffectCovid3
test elite + eliteXjobeffectCovid3 = tech + techXjobeffectCovid3
esttab mA5Ba mA5Bb using "figures_tables/AppendixtableF6B.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell
*lincom estimates added manually

************************************************
*TABLE F7A: EFFECTS FOR HIGH EDUCATION SUBGROUP*
************************************************

eststo mA6Aa: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid if CollegeDegree==1, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
test for + forXknow=elite + eliteXknow
test for + forXknow = tech + techXknow
test elite + eliteXknow = tech + techXknow
eststo mA6Ab: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3 if CollegeDegree==1, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
test for + forXjobeffectCovid3=elite + eliteXjobeffectCovid3
test for + forXjobeffectCovid3 = tech + techXjobeffectCovid3
test elite + eliteXjobeffectCovid3 = tech + techXjobeffectCovid3
esttab mA6Aa mA6Ab using "figures_tables/AppendixtableF7A.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell

***********************************************
*TABLE F7B: EFFECTS FOR LOW EDUCATION SUBGROUP*
***********************************************

eststo mA6Ba: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid if CollegeDegree==0, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
test for + forXknow=elite + eliteXknow
test for + forXknow = tech + techXknow
test elite + eliteXknow = tech + techXknow
eststo mA6Bb: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3 if CollegeDegree==0, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
test for + forXjobeffectCovid3=elite + eliteXjobeffectCovid3
test for + forXjobeffectCovid3 = tech + techXjobeffectCovid3
test elite + eliteXjobeffectCovid3 = tech + techXjobeffectCovid3
esttab mA6Ba mA6Bb using "figures_tables/AppendixtableF7B.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell
*lincom estimates added manually*

*********************************************
*TABLE F8A: EFFECTS FOR HIGH INCOME SUBGROUP*
*********************************************

eststo mA7Aa: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid if hhi>12, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
test for + forXknow=elite + eliteXknow
test for + forXknow = tech + techXknow
test elite + eliteXknow = tech + techXknow
eststo mA7Ab: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3 if hhi>12, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
test for + forXjobeffectCovid3=elite + eliteXjobeffectCovid3
test for + forXjobeffectCovid3 = tech + techXjobeffectCovid3
test elite + eliteXjobeffectCovid3 = tech + techXjobeffectCovid3
esttab mA7Aa mA7Ab using "figures_tables/AppendixtableF8A.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell

********************************************
*TABLE F8B: EFFECTS FOR LOW INCOME SUBGROUP*
********************************************

eststo mA7Ba: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid if hhi<13, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
test for + forXknow=elite + eliteXknow
test for + forXknow = tech + techXknow
test elite + eliteXknow = tech + techXknow
eststo mA7Bb: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3 if hhi<13, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
test for + forXjobeffectCovid3=elite + eliteXjobeffectCovid3
test for + forXjobeffectCovid3 = tech + techXjobeffectCovid3
test elite + eliteXjobeffectCovid3 = tech + techXjobeffectCovid3
esttab mA7Ba mA7Bb using "figures_tables/AppendixtableF8B.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell
*lincom estimates added manually

***********************************************************
*TABLE F9A: EFFECTS FOR HIGH TRUST IN REPUBLICANS SUBGROUP*
***********************************************************

eststo mA8Aa: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid if Republicanbetter==1, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
test for + forXknow=elite + eliteXknow
test for + forXknow = tech + techXknow
test elite + eliteXknow = tech + techXknow
eststo mA8Ab: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3 if Republicanbetter==1, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
test for + forXjobeffectCovid3=elite + eliteXjobeffectCovid3
test for + forXjobeffectCovid3 = tech + techXjobeffectCovid3
test elite + eliteXjobeffectCovid3 = tech + techXjobeffectCovid3
esttab mA8Aa mA8Ab using "figures_tables/AppendixtableF9A.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell
*add linear combinations manually

*********************************************************
*TABLE F9B: EFFECTS FOR HIGH TRUST IN DEMOCRATS SUBGROUP*
*********************************************************

eststo mA8Ba: reg pandemicsupport tech for elite techXknow forXknow eliteXknow knowCovid if Democratbetter==1, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
test for + forXknow=elite + eliteXknow
test for + forXknow = tech + techXknow
test elite + eliteXknow = tech + techXknow
eststo mA8Bb: reg pandemicsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3 if Democratbetter==1, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
test for + forXjobeffectCovid3=elite + eliteXjobeffectCovid3
test for + forXjobeffectCovid3 = tech + techXjobeffectCovid3
test elite + eliteXjobeffectCovid3 = tech + techXjobeffectCovid3
esttab mA8Ba mA8Bb using "figures_tables/AppendixtableF9B.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell
*add linear combinations manually

************
*APPENDIX G*
************

*********
*TABLE G1*
*********

eststo m2a: reg econsupport tech for elite techXknow forXknow eliteXknow knowCovid, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
eststo m2b: reg healthsupport tech for elite techXknow forXknow eliteXknow knowCovid, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
eststo m2c: reg broadensocsec tech for elite techXknow forXknow eliteXknow knowCovid, robust
lincom (for + forXknow) - (elite + eliteXknow)
lincom (for + forXknow) - (tech + techXknow)
lincom (elite + eliteXknow) - (tech + techXknow)
eststo m2d: reg econsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
eststo m2e: reg healthsupport tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)
eststo m2f: reg broadensocsec tech for elite techXjobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 jobeffectCovid3, robust
lincom (for + forXjobeffectCovid3) - (elite + eliteXjobeffectCovid3)
lincom (for + forXjobeffectCovid3) - (tech + techXjobeffectCovid3)
lincom (elite + eliteXjobeffectCovid3) - (tech + techXjobeffectCovid3)

esttab m2a m2b m2c m2d m2e m2f using "figures_tables/AppendixtableG1.rtf", order(for elite tech knowCovid forXknow eliteXknow techXknow jobeffectCovid3 forXjobeffectCovid3 eliteXjobeffectCovid3 techXjobeffectCovid3) $esttabformat replace label onecell
*Note: lincom estimates added manually to table*



log close
